Reproducible Research

Reproducible Research

History of reproducible research

Gavish & Gonoho AAAS 2011, Oxberry 2013

Motivations: Claerbout’s principle

“An article about computational result is advertising, not scholarship. The actual scholarship is the full software environment, code and data, that produced the result.”
Claerbout and Karrenbach, Proceedings of the 62nd Annual International Meeting of the Society of Exploration Geophysics. 1992

Benefits are straightforward

But limitations are substantial

Technical

Cultural & personal

Our work exists on a spectrum of reproducibility

alt text

Peng 2011, Science 334(6060) pp. 1226-1227

Goal: expose more of the research workflow

alt text

http://www.stodden.net/AMP2011/slides/pengslides.pdf

Common practices of many scientists

  1. Enter data in Excel
  2. Use Excel for data cleaning & descriptive statistics
  3. Use ArcGIS and use point-and-click options for processing and visualization
  4. Import data into SPSS/SAS/Stata for further analysis
  5. Use point-and-click options to run statistical analyses
  6. Copy & paste output to Word document, repeatedly

alt text

Common practices of many scientists

alt text

Click trails are ephemeral & dangerous

Case study: Reinhart and Rogoff controversy

alt text

alt text

Excel coding error sliced several countries out of the data set…. The Economist

Case study: Gay Marrage

In May 2015 Science retracted a study of how canvassers can sway people’s opinions about gay marriage published just 5 months ago.

- Science Editor-in-Chief Marcia McNutt

Two Berkeley grad students who attempted to replicate the study quickly discovered that the data must have been faked.

Source

Case study: Seizure Medicine

2013 Seizure study retracted after authors realize data got “terribly mixed”

“The article has been retracted at the request of the authors. After carefully re-examining the data presented in the article, they identified that data of two different hospitals got terribly mixed. The published results cannot be reproduced in accordance with scientific and clinical correctness.”" Authors of Low Dose Lidocaine for Refractory Seizures in Preterm Neonates

Source

Bad spreadsheet merge kills depression paper, quick fix resurrects it

Authors informed the journal that the merge of lab results and other survey data used in the paper resulted in an error regarding the identification codes. Results of the analyses were based on the data set in which this error occurred.

Lower levels of CSF IL-6 were associated with current depression and with future depression […]” Original conclusion

Higher levels of CSF IL-6 and IL-8 were associated with current depression […]” Revised conclusion

Source

Scripted analyses are superior

alt text

Literate statistical programming

“Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to humans what we want the computer to do.” Donald E. Knuth, Literate Programming, 1984

For example… If I say that 2 + 2 = 4, why would you believe me?

2+2
## [1] 4

The text and R code are interwoven in the output. The products are ephemeral - focus is on the methods!

Literate statistical programming

Of course 2+2 is trivial, but what if I said:

alt text

Literate programming: for and against

For

Against

Depositing code and data

Payoffs - Free space for hosting (and paid options) - Assignment of persistent DOIs - Tracking citation metrics

Costs - Sometimes license restrictions (CC-BY & CC0) - Limited or no private storage space

alt text alt text alt text

A hierarchy of reproducibility

alt text

Stodden (IASSIST 2010) sampled American academics registered at the Machine Learning conference NIPS (134 responses from 593 requests (23%). Red = communitarian norms, Blue = private incentives

alt text

Stodden (IASSIST 2010) sampled American academics registered at the Machine Learning conference NIPS (134 responses from 593 requests (23%). Red = communitarian norms, Blue = private incentives

Standards to normalise reproducible research

Reproducible Research Standard (Stodden 2009)

Biggest challenge: culture change

Promote culture change through positive attribution

Implement mechanisms to indicate & encourage degrees of compliance (ie. clear definitions for different levels of reproducibility), cf. Stodden’s:

Reproducible Research in R

Need a programming language

The machine-readable part: R

Need a document formatting language

alt text

Markdown: lightweight document formatting syntax. Easy to write, read and publish as-is.

The human-readable part:

Dynamic documents in R

knitr - descendant of Sweave

Engine for dynamic report generation in R

alt text

Pandoc: document converter

alt text http://kieranhealy.org/blog/archives/2014/01/23/plain-text/

A universal document converter, open source, cross-platform

Version Control

Tracking changes with version control

Payoffs

Costs - Learning curve

alt text alt text alt text

Environment for reproducible research

alt text

RStudio ‘projects’ make version control & document preparation simple

Final

Abandoning the habit of secrecy in favor of process transparency and peer review was the crucial step by which alchemy became chemistry.
Raymond, E. S., 2004, The art of UNIX programming: Addison-Wesley.

Colophon

References: See Rmd file for full references and sources